package com.hzy.quetosys.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;

@Data
public class User {
    private int id;

    @NotBlank(message = "用户名不能为空")
    @Size(max = 16,message = "用户名不能超过16个字符")
//    @Pattern()
    private String name;

    @NotBlank(message = "用户密码不能为空")
    @Size(min = 6,message = "用户密码不能超过8个字符")
//    @Pattern()
    private String password;

    @NotBlank(message = "用户等级不能为空")
    private String level;

    private List<Income> income=new ArrayList<>();
    private List<PayOut> payOut=new ArrayList<>();
}
